package com.group01.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author iuoly
 * @since 2022-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ZyComment extends Model<ZyComment> {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commentId;

    /**
     * 创建人者
     */
    private String createBy;

    /**
     * 更新者ID
     */
    private Long updateBy;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 内容
     */
    private String content;

    /**
     * 父级ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    /**
     * 删除状态0默认1删除
     */
    private Integer delFlag;

    /**
     * 社区互动ID
     */
    private Long interactionId;

    /**
     * 创建人ID
     */
    private Long userId;

    /**
     * 备注
     */
    private String remark;

    /**
     * 划属Id
     */
    private Long rootId;


    @Override
    public Serializable pkVal() {
        return this.commentId;
    }

}
